<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('军服设置')" />
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- header -->
    <div th:replace="~{commons/header::header}"></div>

    <!-- left -->
    <div th:replace="~{commons/left::left}"></div>
    <div class="layui-body">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="notice-form">
                <div class="select-list">
                    <ul>
                        <li>
                            姓名：<input type="text" name="stuName"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>


        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = ctx + "common/student";
   console.log(ctx)
    $(function() {
        var options = {
            url: prefix + "/list",
            updateUrlOne: prefix + "/edit/{id}/{stuId}",
            modalName: "军服设置",
            columns: [{
                checkbox: true
            },
                {
                    field: 'stuId',
                    title: '学号',
                    align: "center"
                },
                {
                    field: 'stuName',
                    title: '姓名',
                    align: "center"
                },
                {
                    field: 'stuSex',
                    title: '性别',
                    align: "center"

                },
                {
                    field: 'newStuSuit',
                    title: '军服套装(尺码)',
                    align: "center",
                },
                {
                    field: 'newStuShoes',
                    title: '军训鞋子(尺码)',
                    align: "center"
                },
                {
                    field: 'newStuShit',
                    title: '军服短袖(尺码)',
                    align: "center"
                },
                {
                    field: 'id',
                    title: 'id',
                    visible:false
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs  " href="javascript:void(0)" onclick="$.operate.editCloth(\'' + ($.common.isNotEmpty(row.id)?row.id:999999) + '\',\''+ row.stuId+'\')"><i class="fa fa-edit"></i>编辑</a> ');
                        return actions.join('');
                    }
                }

            ]
        };
        $.table.init(options);
    });

</script>
</body>
</html>